package game;

import game.entity.Paddle;

import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;

public class Player {
	private int points;
	private int direction;
	public final static int DIR_LEFT = 0;
	public final static int DIR_RIGHT = 1;
	private Paddle paddle;

	public Player(int direction) {
		this.direction = direction;
	}

	public void render(GameContainer container, Graphics g) throws SlickException {
		g.setColor(Color.white);
		int x = 0, y = 20;
		if (getDirection() == DIR_LEFT) {
			x = 280;
		}
		else if (getDirection() == DIR_RIGHT) {
			x = 360;
		}
		g.drawString(getPoints() + "", x, y);
	}

	public int getPoints() {
		return points;
	}

	public void setPoints(int points) {
		this.points = points;
	}

	public int getDirection() {
		return direction;
	}

	public void setDirection(int direction) {
		this.direction = direction;
	}

	public Paddle getPaddle() {
		return paddle;
	}

	public void setPaddle(Paddle paddle) {
		this.paddle = paddle;
	}
}
